/*
 * Created by JFormDesigner on Mon Apr 10 09:46:30 CST 2023
 */

package com.canteen.gui.comboform;

import java.awt.*;
import javax.swing.*;

/**
 * @author s303teacher
 */
public class ComboForm extends JFrame {
    public ComboForm() {
        initComponents();
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        label1 = new JLabel();
        comboBox1 = new JComboBox();
        label2 = new JLabel();
        comboBox2 = new JComboBox();
        label3 = new JLabel();
        comboBox3 = new JComboBox();
        label4 = new JLabel();
        textField1 = new JTextField();
        label5 = new JLabel();
        spinner1 = new JSpinner();
        label6 = new JLabel();
        textField2 = new JTextField();
        checkBox1 = new JCheckBox();
        button1 = new JButton();
        button2 = new JButton();

        //======== this ========
        setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("\u5957\u9910\u5f55\u5165");
        setResizable(false);
        var contentPane = getContentPane();
        contentPane.setLayout(null);

        //---- label1 ----
        label1.setText("\u4e3b\u83dc\uff1a");
        contentPane.add(label1);
        label1.setBounds(55, 30, 50, 30);
        contentPane.add(comboBox1);
        comboBox1.setBounds(115, 30, 145, 30);

        //---- label2 ----
        label2.setText("\u914d\u83dc1\uff1a");
        contentPane.add(label2);
        label2.setBounds(55, 75, 50, 30);
        contentPane.add(comboBox2);
        comboBox2.setBounds(115, 75, 145, 30);

        //---- label3 ----
        label3.setText("\u914d\u83dc2\uff1a");
        contentPane.add(label3);
        label3.setBounds(55, 120, 50, 30);
        contentPane.add(comboBox3);
        comboBox3.setBounds(115, 120, 145, 30);

        //---- label4 ----
        label4.setText("\u5907\u6ce8\uff1a");
        contentPane.add(label4);
        label4.setBounds(55, 170, 50, 30);
        contentPane.add(textField1);
        textField1.setBounds(55, 205, 210, 30);

        //---- label5 ----
        label5.setText("\u4efd\u6570\uff1a");
        contentPane.add(label5);
        label5.setBounds(55, 255, 50, 30);

        //---- spinner1 ----
        spinner1.setModel(new SpinnerNumberModel(1, 1, null, 1));
        contentPane.add(spinner1);
        spinner1.setBounds(115, 255, 60, 25);

        //---- label6 ----
        label6.setText("\u4ef7\u683c\uff1a");
        contentPane.add(label6);
        label6.setBounds(55, 300, 50, 30);
        contentPane.add(textField2);
        textField2.setBounds(115, 300, 70, 30);

        //---- checkBox1 ----
        checkBox1.setText("\u4fee\u6539");
        contentPane.add(checkBox1);
        checkBox1.setBounds(new Rectangle(new Point(205, 300), checkBox1.getPreferredSize()));

        //---- button1 ----
        button1.setText("\u5957\u9910\u4fdd\u5b58");
        contentPane.add(button1);
        button1.setBounds(55, 370, 70, 30);

        //---- button2 ----
        button2.setText("\u53d6\u6d88");
        contentPane.add(button2);
        button2.setBounds(170, 370, 82, 30);

        {
            // compute preferred size
            Dimension preferredSize = new Dimension();
            for(int i = 0; i < contentPane.getComponentCount(); i++) {
                Rectangle bounds = contentPane.getComponent(i).getBounds();
                preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
            }
            Insets insets = contentPane.getInsets();
            preferredSize.width += insets.right;
            preferredSize.height += insets.bottom;
            contentPane.setMinimumSize(preferredSize);
            contentPane.setPreferredSize(preferredSize);
        }
        setSize(325, 465);
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JLabel label1;
    private JComboBox comboBox1;
    private JLabel label2;
    private JComboBox comboBox2;
    private JLabel label3;
    private JComboBox comboBox3;
    private JLabel label4;
    private JTextField textField1;
    private JLabel label5;
    private JSpinner spinner1;
    private JLabel label6;
    private JTextField textField2;
    private JCheckBox checkBox1;
    private JButton button1;
    private JButton button2;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
